(bug 2110) "noarticletext" should not display on Image page for "sharedupload" media
authorJens Frank <jeluf@users.mediawiki.org>
Fri, 20 May 2005 22:41:17 +0000 (22:41 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Fri, 20 May 2005 22:41:17 +0000 (22:41 +0000)
RELEASE-NOTES
includes/ImagePage.php

index 4b3eb04..4f8523c 100644 (file)
@@ -195,6 +195,7 @@ Various bugfixes, small features, and a few experimental things:
   crystalsvg theme.
 * Fixed a bug in Special:Newimages that made it impossible to search for '0'
 * (bug 2095) Triple-closing-bracket thing partly fixed
+* (bug 2110) "noarticletext" should not display on Image page for "sharedupload" media
 
 
 === Caveats ===
index 7d2dc3e..66f6628 100644 (file)
@@ -99,6 +99,20 @@ class ImagePage extends Article {
                return substr($r, 0, -3) . '|}';
        }
 
+       /**
+        * Overloading Article's getContent method.
+        * Omit noarticletext if sharedupload 
+        *
+        * @param $noredir If true, do not follow redirects
+        */
+       function getContent( $noredir )
+       {
+               if ( $this->img && $this->img->fromSharedDirectory && 0 == $this->getID() ) {
+                       return '';
+               }
+               return Article::getContent( $noredir );
+       }
+
        function openShowImage()
        {
                global $wgOut, $wgUser, $wgImageLimits, $wgRequest,